<?php
/**
 * Created by PhpStorm.
 * User: castle
 * Date: 15-4-13
 * Time: 下午8:49
 */
namespace Repair\Model;
use Think\Model;

class LogModel extends  Model{
    protected $_map = array(
        'LID'=>'lid',
'Type'=>'type',
'UID'=>'uid',
'Content'=>'content',
'Time'=>'time',
'OrderID'=>'orderid',

	);
	//获取单个信息
    function get($LID){
        //此处要判断是否有APPID，如果有APPID则在此处加上APPID相关信息
        if(is_numeric($LID)){return $this->where(array('LID'=>$LID,))->find();}return false;
    }
    //获取所有信息
    function gets($LID = false){
        if(false === $LID ){
            return $this->where(array())->cache(7200)->select();
        }else if(is_array($LID)){
            return $this->where('LID in ('.implode(',',$LID).')')->select();
        }else{
            return false;
        }
    }
}
?>
